home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
hp48hor2
/
istk.doc
< prev
next >
Wrap
Internet Message Format
|
1995-03-31
|
5KB
Date: January 10, 1992
ISTK - Directory
Programmable Interactive Stack
Copyright 1992
Brian Maguire
All Rights Reserved
úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
3 Mini-instructions: Program, List, BSTK. -jkh- 3
àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù
DISCLAIMERS
ISTK and this manual are presented without warranties, expressed
or implied. The author makes no guarantee as to the fitness of
this software.
ISTK can be copied freely provided the software, including this
manual, is copied in its entirety. The user cannot be charged,
in whole or in part, except for the cost of reproduction. No
part of this package may be used for commercial purposes without
written permission from the author.
ACKNOWLEDGEMENTS
Special thanks to Bill Quinlan for giving me the idea to write
these programs.
SUMMARY
The programs contained in the directory ISTK allows the user to
customize the interactive stack to some degree. Three options
are available. The user can add custom menu labels to the
existing menu, the top level on the display and the level pointed
to by the cursor can be programmably changed while in the
interactive stack, and the same two parameters can be initialized
before entering the interactive stack.
BSTK, the main program, accepts a program and a list as input.
The program on level two is run after the interactive stack
environment is setup and before control is given to the user.
This allows the initial parameters to be changed using the
program ISTO. The list on level one is added to the existing
menu.
IRCL and ISTO are designed to be used only when the interactive
stack environment has been set up. IRCL recalls the stack level
pointed to by the cursor and the level displayed on the top line.
Likewise, ISTO stores new values in these respective parameters.
BSTK
Programmable interactive stack
Input Output
----- ------
2: Program (Initialization program) Enters the interactive
1: List (menu list) stack.
IRCL
Recall interactive stack parameters
Input Output
----- ------
2: Real number (Cursor stack level)
None 1: Real number (Top stack level on display)
ISTO
Store interactive stack parameters
Input Output
----- ------
2: Real number (Cursor stack level)
1: Real number (Top stack level on display) None
In addition to the three main programs, an example is included in
this directory. The variable { FILE GOTO SORT$ SRCH$ STR->OB }
create a simple data browser that makes use of the interactive
stack. I tried to write as much of this example in user RPL as I
could so most anyone could follow it. Some of the techniques
used in this example can be used in many other applications.
The main program is FILE. It take a list of strings and explodes
them on the stack. Then, using BSTK and ISTO, the cursor is
moved to the top stack level and three new menu keys are added.
[GOTO]
Prompts the user for a stack level to jump to (something that HP
forgot to include),
[SORT]
Sorts the strings on the stack in ascending order
[FIND]
Prompts the user for a search string and searches the stack for a
match. This search starts at the stack level pointed to by the
cursor and ends at level one. This allows the user to perform a
search on selected levels of the stack.
The two sub-programs that are written in system RPL can also be
used as stand alone programs.
SORT$
Sorts n strings on the stack
Input Output
----- ------
n: String n: String
... ... ... ...
... String ... String
1: Real number 1: Real number
STR->OB
Convert a string into an object and returns the object and its
type number. If the conversion would result in an "Invalid
Syntax" error the original string and -1 is returned.
Input Output
----- ------
2: Object
1: String 1: Real number
Enjoy,
Brian Maguire
139 Kingsbury
Dearborn, MI 48128